﻿<script type="text/javascript">
    $(function() {
        $("#banhezhan_chaxun").click(function() {
            //查询
            var dateKaiShi = $("#banhezhan_date_kaishi").datetimebox('getValue');
            var dateJieShu = $("#banhezhan_date_jieshu").datetimebox('getValue');

            var zhanDanStr = $("#banhezhan_zhandian").combobox('getValue');
            $("#banhezhan_mingxi").datagrid("load", { zhandian: zhanDanStr, kaishishijian: dateKaiShi, jieshushijian: dateJieShu, uid: window.uid, kid: window.kid });
        });
        $("#banhezhan_daochu").click(function() {
            //导出
        });
        $("#banhezhan_zhandian").combobox({
            url: 'json/zhandian.json',
            method: 'get',
            valueField: 'zhandian',
            textField: 'zhandian',
            panelWidth: 150,
            panelHeight: 'auto',
            editable: false,
            onLoadSuccess: function() {
                $("#banhezhan_mingxi").datagrid({ url: "handler/banhezhanmingxi.ashx", method: "get", queryParams: { zhandian: $('#banhezhan_zhandian').combobox('getValue'), kaishishijian: $("#banhezhan_date_kaishi").datetimebox('getValue'), jieshushijian: $("#banhezhan_date_jieshu").datetimebox('getValue'), uid: window.uid, kid: window.kid }, height: document.body.scrollHeight - 200 });
            }
        });

    });
    $.parser.onComplete = function() {
        var d = new Date();
        $("#banhezhan_date_kaishi").datetimebox('setValue', d.toLocaleDateString()+" 00:00:00");
        $("#banhezhan_date_jieshu").datetimebox('setValue', d.toLocaleDateString()+" 23:59:59");
    }
</script>

<div class="easyui-panel" data-options="height:90,border:false" title="数据检索" style="border-top-width: 0px;
    border-bottom-width: 1px; padding: 15px">
    <table style="font-size: 12px;">
        <tr>
          <td>
                站点：
            </td>
            <td>
                <input class="" name="banhezhan_zhandian" id="banhezhan_zhandian" style="width: 150px;" />
            </td>
            <td>
                生产时间：
            </td>
            <td>
                <input id="banhezhan_date_kaishi" type="text"  class="easyui-datetimebox" data-options="required:true,showSeconds:true"
                    style="width: 175px">
            </td>
            <td>
                至
            </td>
            <td>
                <input id="banhezhan_date_jieshu" type="text"  class="easyui-datetimebox" data-options="required:true,showSeconds:true"
                    style="width: 175px">
            </td>
            <td>
                <a id="banhezhan_chaxun" class="easyui-linkbutton" data-options="iconCls:'icon-search'"
                    style="width: 60px; margin-left: 20px;">查询</a>
            </td>
            <td>
                <a id="banhezhan_daochu" class="easyui-linkbutton" data-options="iconCls:'icon-export-16'"
                    style="width: 60px">导出</a>
            </td>
        </tr>
    </table>
</div>
<table id="banhezhan_mingxi" class="easyui-datagrid" title="拌合站生产明细" data-options="border:false,singleSelect:true,collapsible:false,striped:true">
    <thead>
        <tr>
        <th data-options="field:'zhandian',width:90">
                站点
            </th>
            <th data-options="field:'gl1',width:130,align:'right'">
                0mm-5mm(吨)
            </th>
            <th data-options="field:'gl2',width:130,align:'right'">
               5mm-10mm(吨)
            </th>
            <th data-options="field:'gl3',width:130,align:'right'">
              10mm-20mm(吨)
            </th>
            <th data-options="field:'gl4',width:130,align:'right'">
               20mm-30mm(吨)
            </th>
<!--            <th data-options="field:'gl5',width:90,align:'right'">
                备仓(吨)
            </th>-->
            <th data-options="field:'fl',width:90,align:'right'">
                粉料(吨)
            </th>
            <th data-options="field:'shui',width:90,align:'right'">
                水(吨)
            </th>
            <th data-options="field:'shijian',width:160">
                生产时间
            </th>
        </tr>
    </thead>
</table>
